/**
 * desc: 首页
 *
 */
import { useEffect, useState } from "react";
import React from "react";
import { Button, Flex } from "antd";
import { Segmented, Tabs } from "antd";
import "./index.less";
import FileType from "./components/fileType";
import FileList from "./components/fileList";

const Index = () => {
  const [tabCheck, setTabCheck] = useState("type");

  const onChange = (key) => {
    setTabCheck(key);
  };

  const TabList = [
    {
      key: "type",
      label: "文件类型",
      children: <FileType />,
    },
    // {
    //   key: "list",
    //   label: "文件列表",
    //   children: <FileList />,
    // },
  ];

  return (
    <div className="index">
      <Tabs
        value={tabCheck}
        style={{
          marginBottom: 8,
        }}
        onChange={onChange}
        items={TabList}
      />
    </div>
  );
};

export default Index;
